package com.mkyong.common.repository.rowmapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.mkyong.common.model.Question;


public class QuestionRowMapper implements RowMapper<Question>{

	public Question mapRow(ResultSet rs, int rowNum) throws SQLException {
	    Question question = new Question();
	    question.setId(rs.getInt("ID"));
	    question.setTitle(rs.getString("title"));
	    question.setContent(rs.getString("content"));
		return question;
	}

}
